/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package tetrix;

import javax.swing.JLabel;
import javax.swing.border.Border;
import javax.swing.border.CompoundBorder;
import javax.swing.border.LineBorder;

/**
 *
 * @author juan.osorio
 */
public class Tablero {
    
    private final int TABLE_WIDTH = 12;
    private final int TABLE_HEIGHT = 25;
    
    private int[][] tablero;
    
    public int numero;
    
    public Tablero(){
        tablero = new int[TABLE_HEIGHT][TABLE_WIDTH];
        for(int i=0; i<TABLE_HEIGHT; i++){
            for(int j=0; j<TABLE_WIDTH; j++){
                tablero[i][j] = 0;
            }
        }
    }
    
    public JLabel[][] imprimirTablero(){
        JLabel[][] table = new JLabel[TABLE_HEIGHT][TABLE_WIDTH];
        Border border = LineBorder.createGrayLineBorder();
        for(int i=0; i<TABLE_HEIGHT; i++){
            for(int j=0; j<TABLE_WIDTH; j++){
                JLabel etiqueta = new JLabel();
                etiqueta.setBounds(j*20, i*20, 20, 20);
                etiqueta.setBorder(border);
                etiqueta.setVisible(true);
                table[i][j] = etiqueta;
            }
        }
        return table;
    }

    /**
     * @return the TABLE_WIDTH
     */
    public int getTABLE_WIDTH() {
        return TABLE_WIDTH;
    }

    /**
     * @return the TABLE_HEIGHT
     */
    public int getTABLE_HEIGHT() {
        return TABLE_HEIGHT;
    }
    
}
